package com.huli.mapper;

import com.huli.pojo.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 张庆阳
* @description 针对表【sys_user(用户表)】的数据库操作Mapper
* @createDate 2025-03-17 10:53:45
* @Entity com.huli.domain.SysUser
*/
public interface SysUserMapper extends BaseMapper<SysUser> {
    // 根据手机号获取手机号
    String getPhone(String phone);

    // 插入验证码
    boolean insertCaptcha(@Param("phone") String phone, @Param("captcha") Integer captcha);

    // 登录
    boolean login(@Param("phone") String phone,@Param("captcha") int captcha);

    // 根据用户id查询用户
    SysUser selectUserById(Long userId);

    List<com.huli.domain.SysUser> findAll();

    com.huli.domain.SysUser findById(String id);
}




